Line and page breaking

Bars provide a line breaking mechanism which is supposed to enable TEX to break a full score into lines and pages, with an optimal distribution of the text into lines and pages. Unfortunately, this does not work correctly for scores of more that approximately one page. The reason is that TEX must compile the entire contents of a paragraph, before it tries to break it into lines and pages. Therefore, one cannot rely on TEX to make that work which automatically results in the diagnostic normalshapemediumseriesTeX capacity exceeded, memory....


To circumvent this dramatically restrictive capacity2.14 unless you use some BigTEX2.15 another mechanism must be invoked to break lines.


The first one is the manual one: you replace some of the normalshapemediumseries\ barre macro calls by either normalshapemediumseriesnormalshapemediumseries\alaligne (equivalent to normalshapemediumseriesnormalshapemediumseries\break within text: in fact it contains a normalshapemediumseriesnormalshapemediumseries\break plus some (many) other things). In the same way, you can code normalshapemediumseries\alapage to force an normalshapemediumseriesnormalshapemediumseries\eject with proper reinitialization of staffs, clefs and signatures.


The second one is fit for scores with bars of regular length: after normalshapemediumseriesnormalshapemediumseries\debutmorceau, you code the following macro:


normalshapemediumseries\autolines tml


where t is the number of elementary spacings (the length of normalshapemediumseries\notes...normalshapemediumseries\enotes) in an average bar, m is the number of bars you wish in a line and l is the number of lines you wish in a page2.16.


This sets some parameters, namely normalshapemediumseriesnormalshapemediumseries\maxbarsinline and normalshapemediumseriesnormalshapemediumseries\maxlinesinpage which are simply used to count the bars, optionally perform normalshapemediumseriesnormalshapemediumseries\alaligne or normalshapemediumseriesnormalshapemediumseries\alapage instead of the normal normalshapemediumseriesnormalshapemediumseries\barre. You may freely alter the values of these parameters, once they have been established by normalshapemediumseriesnormalshapemediumseries\autolines. Moreover, you can still force line breaking of page ejection using normalshapemediumseries\alaligne or normalshapemediumseriesnormalshapemediumseries\alapage without problem since these macros actually reset the bar counters appropriately.


On the other hand, you may want to forbid line breaking at a bar, then you replace normalshapemediumseries\barre by normalshapemediumseriesnormalshapemediumseries\xbarre.


Conversely, you may want to break a line not at a bar2.17. This is allowed by normalshapemediumseriesnormalshapemediumseries\zbarre (optional line break) or forced by normalshapemediumseries\ zalaligne or normalshapemediumseriesnormalshapemediumseries\zalapage.


The final heavy double bar of a piece is provided by normalshapemediumseriesnormalshapemediumseries\finmorceau. If you just want to terminate the text with a simple bar, you say normalshapemediumseriesnormalshapemediumseries\suspmorceau. If you want to terminate it without a bar, you code normalshapemediumseriesnormalshapemediumseries\zsuspmorceau. Once you have stopped the score by any of these means, you can restart it using normalshapemediumseriesnormalshapemediumseries\reprmorceau.


If you want the next vertical bar to be a double bar, you have to declare normalshapemediumseriesnormalshapemediumseries\setdoublebar before the normalshapemediumseriesnormalshapemediumseries\barre (or the normalshapemediumseriesnormalshapemediumseries\suspmorceau or normalshapemediumseriesnormalshapemediumseries\alaligne or normalshapemediumseriesnormalshapemediumseries\alapage) to be marked with a double thin bar.